package cn.steel.mapper;

import cn.steel.domain.entity.SupplierInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SupplierInfoMapper {
    SupplierInfo findByUserId(Long userId);
    void insertSupplierInfo(SupplierInfo supplierInfo);
    void updateSupplierInfo(SupplierInfo supplierInfo);
    List<SupplierInfo> findAllPaginated(String search);

    // 新增方法：查询前十供应商
    List<SupplierInfo> findTop10ByAverageRating();

    // 根据供应商ID查询供应商信息
    SupplierInfo getSupplierInfoById(Long supplierId);

}